package com.gz.mylife.app;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.gz.mylife.Define;
import com.gz.mylife.R;

import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class Systemnofity extends BaseActivity implements OnClickListener {
	private TextView mtitle;
	private TextView mdatetime;
	private TextView mcontent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_systemnotify);
		setActionbarTitle(getIntent().getStringExtra("titles"), false);
		Bundle bundle = this.getIntent().getExtras();
		mtitle = (TextView) findViewById(R.id.title);
		mdatetime = (TextView) findViewById(R.id.createtime);
		mcontent = (TextView) findViewById(R.id.content);
		String title = bundle.getString("title");// 获取系统通知的标题
		String content = bundle.getString("content");// 获取系统通知的内容
		Long datetime = bundle.getLong("datetime");// 获取系统通知发布的时间
		String date = datetime.toString();
		long newdate = Long.valueOf(date+"000");
		SimpleDateFormat df = new SimpleDateFormat("yyyy.MM.dd");
		mtitle.setText(title);
		mdatetime.setText("发布时间：" + df.format(new Date(newdate)));
		mcontent.setText("      " + content);
		String pictureString = bundle.getString("picture");

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.iv_check:
			break;

		}
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		if (keyCode == KeyEvent.KEYCODE_BACK) {

		}
		return super.onKeyDown(keyCode, event);
	}

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		switch (requestCode) {
		case Define.ACTIVITY_CODE_PICTURE_FROM_CAMERA:
			break;
		}
	}

}
